package gxdlxy.zx2202.exmple4_7;

public class Staff {
    String name;
    String address;
    String workId;
    double salary;
    double workAge;

    Staff(double salary) {
        this.salary = salary;
    }

    void addSalary() {
        this.salary = this.salary * 1.1;
        System.out.println("工资为" + this.salary);
    }

    // TODO 多态
    static void SalaryInc(Staff staff) {
        staff.addSalary();
    }

    public static void main(String[] args) {
        Staff 小张 = new Staff(3000);
        Manager 王经理 = new Manager(6000);
        Staff.SalaryInc(小张);
        Staff.SalaryInc(王经理);
    }
}
